/*
 
 */
package com.ohos.connent.accountcloud.sys.modular.resource.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.ohos.connent.accountcloud.common.pojo.CommonResult;
import com.ohos.connent.accountcloud.sys.modular.resource.entity.SysPermissions;
import com.ohos.connent.accountcloud.sys.modular.resource.param.permissions.SysPermissionsPageParam;
import com.ohos.connent.accountcloud.sys.modular.resource.service.SysPermissionsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * 权限控制器
 *
 *
 **/
@Api(tags = "权限控制器")
@ApiSupport(author = "OHOSCONNECT_TEAM", order = 6)
@RestController
@Validated
@RequestMapping("/api/v1/account/permissions")
public class SysPermissionsController {

    @Resource
    private SysPermissionsService sysPermissionsService;

    /**
     * 获取模块分页
     *
     *
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取权限分页")
    @PostMapping("/page")
    public CommonResult<Page<SysPermissions>> page(@RequestBody @Valid SysPermissionsPageParam sysPermissionsPageParam) {
        return CommonResult.data(sysPermissionsService.page(sysPermissionsPageParam));
    }

}
